iLoADER

HOME

Aggregate based dynamic fields example

An Aggregate based dynamic field allows records at a lower database level to be aggregated at a higher one. For example, a bank's customer may hold several accounts.

The script is written in the following format:

AGGREGATE, Full Table Name , Aggregate Name , Aggregate Type , Aggregate Column, {NSQL clause}

If you are using the Data Transformation wizard, these entries relate to the column fields as follows:

Aggregate Aggregate
Full Table Name Parent Table
Aggregate Name The name of the Aggregate
Aggregate Type The type of aggregate.
Column Aggregate The column to aggregate
{NSQL Clause} NucEngine SQL Clause

The following example creates an Aggregate field containing the mean income per household.

AGGREGATE, [Demo].[Household], Avg Hhold Income, MEAN, [Demo].[Customer].[Income], {}

Note: An NSQL query is optional. It is useful if you want to filter the data as well as aggregate it. If a query is not required, the curly brackets still need to appear but should be empty. An aggregate can be performed on any field in the table.

The possible types of aggregate are:

COUNT, SUM, MIN, MAX, MEAN, STDEV, STDEVS, REALMEAN and STANDARDDEV

  Online & Instructor-Led Courses | Training Videos | Webinar Recordings
© Alterian. All Rights Reserved. | Privacy Policy | Legal Notice